package com.gt.savefile

import com.gt.SCUtil
import org.apache.spark.SparkContext
import org.apache.spark.rdd.RDD

object SaveFile {
  def main(args: Array[String]): Unit = {
    val sc: SparkContext = SCUtil.buildLocalSc()
    val rdd: RDD[(String, String)] = sc.makeRDD(List(
      ("1", "a"),
      ("2", "b")
    ))

    rdd.saveAsTextFile("data/data2")
    rdd.saveAsSequenceFile("data/data3")



  }
}
